home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / net / netisr.h < prev    next >
C/C++ Source or Header  |  1988-10-23  |  2KB  |  50 lines

  1. /*
  2.  * Copyright (c) 1980, 1986 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that this notice is preserved and that due credit is given
  7.  * to the University of California at Berkeley. The name of the University
  8.  * may not be used to endorse or promote products derived from this
  9.  * software without specific prior written permission. This software
  10.  * is provided ``as is'' without express or implied warranty.
  11.  *
  12.  *    @(#)netisr.h    7.3 (Berkeley) 12/30/87
  13.  */
  14.  
  15. #ifndef _NETISR
  16. #define _NETISR
  17.  
  18. /*
  19.  * The networking code runs off software interrupts.
  20.  *
  21.  * You can switch into the network by doing splnet() and return by splx().
  22.  * The software interrupt level for the network is higher than the software
  23.  * level for the clock (so you can enter the network in routines called
  24.  * at timeout time).
  25.  */
  26. #if defined(vax) || defined(tahoe)
  27. #define    setsoftnet()    mtpr(SIRR, 12)
  28. #endif
  29.  
  30. /*
  31.  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
  32.  * word which is used to de-multiplex a single software
  33.  * interrupt used for scheduling the network code to calls
  34.  * on the lowest level routine of each protocol.
  35.  */
  36. #define    NETISR_RAW    0        /* same as AF_UNSPEC */
  37. #define    NETISR_IP    2        /* same as AF_INET */
  38. #define    NETISR_IMP    3        /* same as AF_IMPLINK */
  39. #define    NETISR_NS    6        /* same as AF_NS */
  40.  
  41. #define    schednetisr(anisr)    { netisr |= 1<<(anisr); setsoftnet(); }
  42.  
  43. #ifndef LOCORE
  44. #ifdef KERNEL
  45. int    netisr;                /* scheduling bits for network */
  46. #endif
  47. #endif
  48.  
  49. #endif /* _NETISR */
  50.